home *** CD-ROM | disk | FTP | other *** search
- property prefix, debug
-
- on new me
- set debug to 0
- if debug >= 4 then
- put EMPTY
- put "New Object: GenericClass"
- end if
- return me
- end
-
- on clearactorlist me, classname, whichprop
- repeat with index = 1 to count(the actorList)
- set obj to getAt(the actorList, index)
- if getObjectName(obj) = classname then
- if value("the " & string(whichprop) & " of obj") = value("the " & string(whichprop) & " of me") then
- deleteAt(the actorList, index)
- exit repeat
- end if
- end if
- end repeat
- end
-
- on getObjectName me
- set oldDelimiter to the itemDelimiter
- delpush(QUOTE)
- set name to item 2 of string(me)
- delpop()
- return name
- end
-
- on safestring me, whichstring
- set pos to offset("'", whichstring)
- repeat while pos > 0
- put QUOTE into char pos of whichstring
- set pos to offset("'", whichstring)
- end repeat
- set pos to offset(";", whichstring)
- repeat while pos > 0
- put RETURN into char pos of whichstring
- set pos to offset(";", whichstring)
- end repeat
- return whichstring
- end
-
- on showobject me
- set curtext to the scriptText of member getObjectName(me)
- repeat with index = 1 to the number of lines in curtext
- set curline to line index of curtext
- case word 1 of curline of
- "on", "property":
- put curline
- end case
- end repeat
- end
-
- on TurnOn me
- put "GenericClass TurnOn called!!"
- end
-
- on TurnOff me
- put "GenericClass TurnOff called!!"
- end
-
- on dispose me, classname, whichprop
- return 0
- end
-